<template>
  <basic-container class="noScrollBar tabMain-wrap">
    <common-template
        ref="detailRef"
        :detailOptions="detailOptions"
        :flowModelId="flowModelId"
        :flowStatus="flowStatus"
        :filePrint="filePrint"
    ></common-template>
  </basic-container>
</template>
<script>
import commonTemplate from "../commonTemplate";
import {
    hbjcFlowModelId,
    getHbjcViewList,
    hbjcPrint
} from "@/api/sxdky/sxdky";
export default {
  data() {
    return {
    // 流程模型
    flowModelId:hbjcFlowModelId,
    // 流程按钮状态
    flowStatus:false,
    // 文件打印
    filePrint:hbjcPrint,
    detailOptions: {
      label: "环保检测报告查询管理",
      name: "reportViewList",
      options: {
          height: "calc(100vh - 425px)",
          addBtn: false,
          menuDelBtn: false,
          menuUpBtn: false,
          menuDownBtn: true,
          dialogDirection: "ltr",
          dialogType: "drawer",
          calcHeight: 30,
          tip: false,
          searchShow: true,
          searchMenuSpan: 6,
          border: true,
          index: true,
          indexLabel: "序号",
          viewBtn: false,
          selection: true,
          excelBtn: false,
          dialogClickModal: false,
          // 自定义操作按钮，下载上传
          menuOtherBtn: true,
          gistBtn: false,
          align: "center",
          menuAlign: "center",
          searchIcon: true,
          searchIndex: 3,
          labelWidth: 120,
          editBtn: false,
          delBtn: false,
          printBtn: false,
          column: [
            {
                label: "检测报告",
                prop: 'reportUploadName',
                type: "upload",
                showFileList: true,
                loadText: "模板上传中，请稍等",
                span: 24,
                propsHttp: {
                    res: "data.data.object",
                },
                slot:true,
                accept: ".docx,.doc,",
                tip: "请上传 .doc,.docx 标准格式文件",
                action: '/api/dis-report/dnzl/upload',
            },
            {
                label: "报告名称",
                prop: "reportUploadName",
                editDisplay: false,
                hide:true,
                viewDisplay: false,
                overHidden: true,
                search: false,
                addDisplay:false,
                rules: [
                    {
                        message: "请输入报告名称",
                        trigger: "click",
                    },
                ],
            },
            {
                label: "报告名称",
                prop: "reportName",
                editDisplay: true,
                viewDisplay: true,
                overHidden: true,
                search: true,
            },
            {
              label: "报告编号",
              prop: "reportNum",
              editDisplay: true,
              viewDisplay: true,
              overHidden: true,
              search: true,
              rules: [
                {
                  required: true,
                  message: "请输入报告编号",
                  trigger: "click",
                },
              ],
            },
            {
                label: "项目编号",
                prop: "projectNum",
                editDisplay: true,
                viewDisplay: true,
                overHidden: true,
                search: true,
                rules: [
                    {
                        required: true,
                        message: "请输入项目编号",
                        trigger: "click",
                    },
                ],
            },
            {
              label: "项目负责人",
              prop: "projectManager",
              search: true,
              editDisplay: true,
              viewDisplay: true,
              overHidden: true,
              rules: [
                {
                  required: true,
                  message: "请输入项目负责人",
                  trigger: "click",
                },
              ],
            },
            {
              label: "试验地点",
              prop: "site",
              search: true,
              editDisplay: true,
              viewDisplay: true,
              rules: [
                {
                  required: true,
                  message: "请输入试验地点",
                  trigger: "click",
                },
              ],
            },
            {
              label: "参加人员",
              prop: "joinPerson",
              search: true,
              editDisplay: true,
              viewDisplay: true,
              overHidden: true,
              rules: [
                {
                  required: true,
                  message: "请输入参加人员",
                  trigger: "click",
                },
              ],
            },
            {
              label: "参加单位",
              prop: "joinDept",
              search: true,
              editDisplay: true,
              viewDisplay: true,
              overHidden: true,
              rules: [
                  {
                      required: true,
                      message: "请输入参加单位",
                      trigger: "click",
                  },
              ],
            },
            {
                label: "报告打印",
                prop: "printMan",
                editDisplay: true,
                viewDisplay: true,
                overHidden: true,
                search: true,
                rules: [
                    {
                        required: true,
                        message: "请输入报告打印",
                        trigger: "click",
                    },
                ],
            },
            {
                label: "校阅",
                prop: "reviewer",
                editDisplay: true,
                viewDisplay: true,
                overHidden: true,
                search: true,
                rules: [
                    {
                        required: true,
                        message: "请输入校阅",
                        trigger: "click",
                    },
                ],
            },
            {
              label: "试验日期",
              prop: "testDate",
              sortable: true,
              editDisplay: true,
              viewDisplay: true,
              overHidden: true,
              rules: [
                {
                  required: true,
                  message: "请输入试验日期",
                  trigger: "click",
                },
              ],
            },
            {
                label: "报告日期",
                prop: "reportDate",
                type: "date",
                sortable: true,
                editDisplay: true,
                viewDisplay: true,
                overHidden: true,
                format: "yyyy-MM-dd",
                valueFormat: "yyyy-MM-dd",
                rules: [
                    {
                        required: true,
                        message: "请输入报告日期",
                        trigger: "click",
                    },
                ],
            },
            {
                label: "报告页数",
                prop: "page",
                type: "number",
                editDisplay: true,
                viewDisplay: true,
                overHidden: true,
                sortable: true,
                controlsPosition: "top",
            },
              {
                  label: "出版份数",
                  prop: "pubCount",
                  type: "number",
                  editDisplay: true,
                  viewDisplay: true,
                  overHidden: true,
                  sortable: true,
                  controlsPosition: "top",
              },
              {
                  label: "提交人",
                  prop: "submitName",
                  search: true,
                  addDisplay:false,
                  editDisplay: false,
                  viewDisplay: false,
                  overHidden: true,
                  rules: [
                      {
                          required: true,
                          message: "请输入提交人",
                          trigger: "click",
                      },
                  ],
              },
              {
                  label: "处理状态",
                  prop: "submitStatus",
                  type: "select",
                  search: true,
                  addDisplay:false,
                  editDisplay: false,
                  viewDisplay: false,
                  dicData: [
                      {
                          label: "新建",
                          value: 0,
                      },
                      {
                          label: "待审核",
                          value: 1,
                      },
                      {
                          label: "已审核",
                          value: 2,
                      },
                      {
                          label: "已退件",
                          value: 3,
                      },
                  ],
              },
          ],
        },
        url: {
            getList: getHbjcViewList,
            print:hbjcPrint
        },
      },
    };
  },
  components: {
      commonTemplate,
  },
  computed: {},
  methods: {},
};
</script>

<style lang='scss'>
.tabMain-wrap {
  // height: calc(100vh - 400px);
  overflow: hidden auto;
}
</style>
